package com.leyou.controller;

import java.time.LocalDate;
import java.time.temporal.TemporalAdjusters;

public class SuanFa {
    public static void main(String[] args) {
        LocalDate today = LocalDate.now();
         //本月的第一天
         LocalDate firstday = LocalDate.of(today.getYear(),today.getMonth(),1);
         //本月的最后一天
         LocalDate lastDay =today.with(TemporalAdjusters.lastDayOfMonth());
         System.out.println("本月的第一天"+firstday);
         System.out.println("本月的最后一天"+lastDay);
    }

}
